package BIO;

import java.io.IOException;

/**
 * @author:谢君臣
 * @Date:2021/7/23-16:23
 * @version:1.0
 * @function:
 */
public class FileUploadTest {
    public static void main(String[] args) throws IOException {
        new Thread(()->{
            FileClient fileClient = new FileClient();
            fileClient.setFilePath("D:\\Study\\README.md");
            String file = null;
            try {
                file = fileClient.upload();
            } catch (IOException e) {
                e.printStackTrace();
            }
            System.out.println(file);
        }).start();

        new Thread(()->{
            FileServer fileServer = new FileServer();
            fileServer.setFilePath("D:\\Study\\src\\基础\\NIO");
            try {
                fileServer.save();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }).start();
    }
}
